package com.yuelao.yuelao_backend;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * 月老APP后端应用启动类
 */
@Slf4j
@SpringBootApplication
@EnableTransactionManagement
@MapperScan("com.yuelao.yuelao_backend.mapper")
public class YuelaoBackendApplication {

    public static void main(String[] args) {
        try {
            SpringApplication.run(YuelaoBackendApplication.class, args);
            log.info("=== 月老APP后端服务启动成功 ===");
            log.info("=== 服务地址: http://localhost:8080/api ===");
        } catch (Exception e) {
            log.error("应用启动失败", e);
            System.exit(1);
        }
    }
}
